home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1993 July / Internet Tools.iso / RockRidge / mail / pine / imap-3.0 / ANSI / c-client / os_t20.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-10-27  |  2.9 KB  |  88 lines

  1. /*
  2.  * Program:    Operating-system dependent routines -- TOPS-20 version
  3.  *
  4.  * Author:    Mark Crispin
  5.  *        6158 Lariat Loop NE
  6.  *        Bainbridge Island, WA  98110-2098
  7.  *        Internet: MRC@Panda.COM
  8.  *
  9.  * Date:    1 August 1988
  10.  * Last Edited:    27 October 1992
  11.  *
  12.  * Copyright 1992 by Mark Crispin
  13.  *
  14.  *  Permission to use, copy, modify, and distribute this software and its
  15.  * documentation for any purpose and without fee is hereby granted, provided
  16.  * that the above copyright notices appear in all copies and that both the
  17.  * above copyright notices and this permission notice appear in supporting
  18.  * documentation, and that the name of Mark Crispin not be used in advertising
  19.  * or publicity pertaining to distribution of the software without specific,
  20.  * written prior permission.  This software is made available "as is", and
  21.  * MARK CRISPIN DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, WITH REGARD TO
  22.  * THIS SOFTWARE, INCLUDING WITHOUT LIMITATION ALL IMPLIED WARRANTIES OF
  23.  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, AND IN NO EVENT SHALL
  24.  * MARK CRISPIN BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES
  25.  * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
  26.  * WHETHER IN AN ACTION OF CONTRACT, TORT (INCLUDING NEGLIGENCE) OR STRICT
  27.  * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
  28.  * THIS SOFTWARE.
  29.  *
  30.  */
  31.  
  32.  
  33. /* Dedication:
  34.  * This file is dedicated with affection to the TOPS-20 operating system, which
  35.  * set standards for user and programmer friendliness that have still not been
  36.  * equaled by more `modern' operating systems.
  37.  * Wasureru mon ka!!!!
  38.  */
  39.  
  40.  
  41. #include <stdlib.h>
  42. #include <string.h>
  43. #include <sys/types.h>
  44.  
  45. /* Coddle KCC's 6-character symbol limitation */
  46.  
  47. #define rfc822_date r8date
  48. #define fs_get fsget
  49. #define fs_resize fsrsiz
  50. #define fs_give fsgive
  51. #define strcrlfcpy stclcp
  52. #define server_login slogin
  53. #define tcp_open topen
  54. #define tcp_getline tgline
  55. #define tcp_getbuffer tgbuf
  56. #define tcp_soutr tsoutr
  57. #define tcp_close tclose
  58. #define tcp_host thost
  59. #define tcp_localhost tlocal
  60.  
  61.  
  62. /* Dummy definition overridden by TCP routines */
  63.  
  64. #ifndef TCPSTREAM
  65. #define TCPSTREAM void
  66. #endif
  67.  
  68.  
  69. /* Function prototypes */
  70.  
  71. void rfc822_date (char *date);
  72. void *fs_get (size_t size);
  73. void fs_resize (void **block,size_t size);
  74. void fs_give (void **block);
  75. void fatal (char *string);
  76. char *strcrlfcpy (char **dst,unsigned long *dstl,char *src,unsigned long srcl);
  77. unsigned long strcrlflen (STRING *s);
  78. long server_login (char *user,char *pass,char **home,int argc,char *argv[]);
  79. TCPSTREAM *tcp_open (char *host,int port);
  80. TCPSTREAM *tcp_aopen (char *host,char *service);
  81. char *tcp_getline (TCPSTREAM *stream);
  82. long tcp_getbuffer (TCPSTREAM *stream,unsigned long size,char *buffer);
  83. long tcp_soutr (TCPSTREAM *stream,char *string);
  84. long tcp_sout (TCPSTREAM *stream,char *string,unsigned long size);
  85. void tcp_close (TCPSTREAM *stream);
  86. char *tcp_host (TCPSTREAM *stream);
  87. char *tcp_localhost (TCPSTREAM *stream);
  88.